package mil.af.amc.adpetracker.web.helpers;

import mil.af.amc.adpetracker.model.ItemModel;
import mil.af.amc.adpetracker.service.ItemModelService;
import mil.af.amc.radtaglibrary.tags.PageContextAwareBean;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;

import javax.servlet.jsp.PageContext;
import java.util.List;

/**
 * ViewHelper for ItemModel objects
 *
 * @author TSgt Jason Ferguson
 */
@Service("itemModelViewHelper")
public class ItemModelViewHelper implements PageContextAwareBean {

    private PageContext pageContext;

    @Autowired
    public void setPageContext(PageContext pageContext) {
        this.pageContext = pageContext;
    }

    private ItemModelService itemModelService;

    @Autowired
    public void setItemModelService(ItemModelService itemModelService) {
        this.itemModelService = itemModelService;
    }

    public List<ItemModel> getAll() {
        return itemModelService.getAll();
    }


}
